import request from '@/utlis/request'

// 分页查询
export function getCourseByPage(PageNum,pageSize) {
    return request({
        url: `/course/getCourseByPage`,
        method:'get',
        params:{
          PageNum,
          pageSize
        }
    })
}

//添加
export function addCourse(data) {
    return request({
      url: '/course/addCourse',
      method: 'post',
      data
    })
  }

  //删除
export function delCourse(id) {
    return request({
        url: `/course/deleteCourse/${id}`,
        method: 'delete',
    })
  }
  //更新
  export function updateCourse(data) {
    return request({
      url: '/course/updateCourse',
      method: 'post',
      data
    })
  }